import request from '@/utils/request'

export default {
  pageRole(current, limit) {
    return request({
      url: `/role/pageRole/${current}/${limit}`,
      method: 'get'
    })
  },
  deleteRoleById(id) {
    return request({
      url: `/role/${id}`,
      method: 'delete'
    })
  },
  //添加用户
  addUser(role) {
    return request({
      url: `/role/addRole`,
      method: 'post',
      data: role
    })
  },
  //根据ID值获取用户信息
  getRoleById(id) {
    return request({
      url: `/role/getRoleById/${id}`,
      method: 'get'
    })
  },
  //修改讲师信息
  updateRoleInfo(role) {
    return request({
      url: `/role/updateRole`,
      method: 'post',
      data: role
    })
  }
}
